class Solution(object):
    def sumGame(self, num):
        c = num.count('?')
        if c % 2:
            return True
        else:
            n = len(num)
            m = n // 2
            left_val = 0
            left_c = 0
            right_val = 0
            right_c = 0
            for i in range(m):
                if num[i] == '?':
                    left_c += 1
                else:
                    left_val += int(num[i])
                if num[n - 1 - i] == '?':
                    right_c += 1
                else:
                    right_val += int(num[n - 1 - i])
            if left_val - right_val == 4.5 * (right_c - left_c):
                return False
            else:
                return True
